Check the status of the ticket identified by {tid}
.
URL Parameters | |
---|---|
format | The format of the returned data. Can be either
html , json , or xml (default). If present, the
format parameter overrides the Accept header. |
If the ticket is still open, MarkLogic Server responds with status code 200 (OK) and the response body contains status details. If the ticket is closed, MarkLogic Server returns status code 303 and the response body includes status details and a link back to the resource upon which the related process was run. See the Usage Notes for an alternative request that avoids the redirect.
manage-user
role, or the following
privilege: http://marklogic.com/xdmp/privileges/manage
You can avoid the redirect response for a completed ticket by omitting the
view=process-status
request parameter. Leaving the view
parameter off requests the default view. Such a request returns a status code 200 (OK), with
status details in the response body.
If you specify forest-replicas
, two or more forests are created: The master
forest on one host and one or more replica forests on other hosts. Note that all of the
hosts must be in the same cluster. See example below.
$ curl --anyauth --user user:password -X GET \ -i -H "Accept: application/xml" \ http://localhost:8002/manage/v2/tickets/6699732791380391489?view=process-status ==> Retrieve ticket status information. If the ticket is still open, MarkLogic Server returns headers similar to the following. The response body contains annotations and status data about the process. HTTP/1.1 200 OK Server: MarkLogic Content-Type: text/plain; charset=UTF-8 Content-Length: 32 Connection: Keep-Alive Keep-Alive: timeout=5 <ticket-process-status xmlns="http://marklogic.com/manage/tickets"> <id>6699732791380391489</id> ... <status-properties> <status>active</status> <start-time>2013-09-21T12:02:54.866173-07:00</start-time> <ticket-expiration>2013-09-28T12:02:54.866173-07:00</ticket-expiration> <database>App-Services</database> ... </status-properties> ... </ticket-process-status>
$ curl --anyauth --user user:password -X GET \ -i -H "Accept: application/xml" \ http://localhost:8002/manage/v2/tickets/6699732791380391489?view=process-status ==> If the ticket is closed, MarkLogic Server returns a redirect to the resource upon which the related operation was performed. The response is similar to the following: HTTP/1.1 303 See Other Location: /manage/v2/forests Content-type: application/xml Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 1612 Connection: Keep-Alive Keep-Alive: timeout=5 <ticket-process-status xmlns="http://marklogic.com/manage/tickets"> <id>6699732791380391489</id> ... <status-properties> <status>completed</status> <start-time>2013-09-21T12:02:54.866173-07:00</start-time> <ticket-expiration>2013-09-28T12:02:54.866173-07:00</ticket-expiration> <database>App-Services</database> ... <time-consumed>PT41.128523S</time-consumed> <errors>0</errors> ... </status-properties> ... </ticket-process-status>